//
// SoapTrace.Net - A soap message monitoring utility. 
//
// Copyright (C) 2005 Matthew Ward
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
//
// Matthew Ward (mrward@users.sourceforge.net)

using NUnit.Framework;
using SoapTrace.Core.Communication;
using SoapTrace.Core.Diagnostics;
using System;
using System.IO;
using System.Text;

namespace SoapTrace.Tests.TcpPacketMonitoring
{
	/// <summary>
	/// Tests that the <see cref="TcpPacketMonitor"/> class's
	/// handling of a missed tcp segment and a sequence number rollover.
	/// </summary>
	[ TestFixture ]
	public class RequestSegmentMissedAndSequenceRolloverTestFixture
	{
		TcpPacketMonitor Monitor;
		StringBuilder ClientMessage;
		StringBuilder ServerMessage;
		
		/// <summary>
		/// Initialises each test.
		/// </summary>
		[ SetUp ]
		public void Init( )
		{
			ClientMessage = new StringBuilder( );
			ServerMessage = new StringBuilder( );
			
			Monitor = new TcpPacketMonitor( "192.168.1.3", 80 );
			Monitor.BytesTransferred += new TcpCommunicationEventHandler( OnBytesTransferred );
			
			StringReader Reader = new StringReader( GetPacketXml( ) );
			PacketLogEntryCollection LogEntries = PacketLogFile.Load( Reader );
			
			foreach( PacketLogEntry Entry in LogEntries )
			{
				Monitor.ProcessPacket( Entry.Packet );
			}
		}
			
		/// <summary>
		/// Check we received the correct message.
		/// </summary>
		[ Test ]
		public void ClientMessageSent( )
		{
			string ExpectedMessage = "POST /MathWebService/Maths.asmx HTTP/1.1\r\n" +
				"User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; MS Web Services Client Protocol 1.1.4322.573)\r\n" +
				"Content-Type: text/xml; charset=utf-8\r\n" +
				"SOAPAction: \"http://tempuri.org/Test\"\r\n" +
				"Content-Length: 1682\r\n" +
				"Expect: 100-continue\r\n" +
				"Connection: Keep-Alive\r\n" +
				"Host: localhost:7001\r\n" +
				"\r\n" +
				"<?xml version=\"1.0\" encoding=\"utf-8\"?>\r\n" +
				"<soap:Envelope xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">\r\n" +
				"  <soap:Body>\r\n" +
				"    <Test xmlns=\"http://tempuri.org/\">\r\n" +
				"      <xml>Release Notes for NUnit 2.2 Final Release \r\n" +
				"August 8, 2004 \r\n" +
				" \r\n" +
				"This is the fourth major release of NUnit and the third since it was  \r\n" +
				"rewritten to take advantage of .NET custom attributes. Highlights of  \r\n" +
				"this release include support for Mono, multiple-test selection in the  \r\n" +
				"GUI interface, a built-in lightweight mock object facility, new \r\n" +
				"command line switches for both GUI and Console runners, and new \r\n" +
				"Category and Explicit attributes. \r\n" +
				" \r\n" +
				"GENERAL \r\n" +
				" \r\n" +
				"NUnit 2.2 is available in separate Microsoft .NET and Mono distributions.  \r\n" +
				"The .NET version can run under Microsoft .NET 1.0, 1.1 or 2.0. The Mono  \r\n" +
				"version runs under Mono 1.0. The Microsoft distribution is built using  \r\n" +
				"Visual Studio 2003. The Mono version is limited to use of nunit-console  \r\n" +
				"to run tests. Note that Mono is distributed with a version of NUnit  \r\n" +
				"pre-installed. It may be necessary replace some of the installed \r\n" +
				"components in order to get a newer version of NUnit to work.  \r\n" +
				" \r\n" +
				"Separate config files for each .NET version are no longer needed. Instead,  \r\n" +
				"binding redirects are provided in each config which apply when running under  \r\n" +
				"version 1.0 or 2.0 of hte .NET framework. By default, the highest level of \r\n" +
				"the framework installed is used. The user may edit the config file if a \r\n" +
				"different preference is desired.</xml>\r\n" +
				"        <text>Test text here...</text>\r\n" +
				"    </Test>\r\n" +
				"  </soap:Body>\r\n" +
				"</soap:Envelope>";
			
			Assert.AreEqual( ExpectedMessage, ClientMessage.ToString( ), "Unexpected message received." );
		}
		
		
		/// <summary>
		/// Check we received the correct message.
		/// </summary>
		[ Test ]
		public void ServerMessageReceived( )
		{
			string ExpectedMessage = "HTTP/1.1 100 Continue\r\n" +
				"Server: Microsoft-IIS/5.0\r\n" +
				"Date: Wed, 09 Feb 2005 12:35:04 GMT\r\n" +
				"X-Powered-By: ASP.NET\r\n" +
				"\r\n" +
				"HTTP/1.1 200 OK\r\n" +
				"Server: Microsoft-IIS/5.0\r\n" +
				"Date: Wed, 09 Feb 2005 12:35:04 GMT\r\n" +
				"X-Powered-By: ASP.NET\r\n" +
				"X-AspNet-Version: 1.1.4322\r\n" +
				"Cache-Control: private, max-age=0\r\n" +
				"Content-Type: text/xml; charset=utf-8\r\n" +
				"Content-Length: 1595\r\n" +
				"\r\n" +
				"<?xml version=\"1.0\" encoding=\"utf-8\"?>" +
				"<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\" " +
				"xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" " +
				"xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\">" +
				"<soap:Body>" +
				"<TestResponse xmlns=\"http://tempuri.org/\">" +
				"<TestResult><string>" +
				"&lt;ticket&gt;&lt;user&gt;matt&lt;/user&gt;&lt;password&gt;secret&lt;/password&gt;&lt;/ticket&gt;" +
				"</string><string>" +
				@"hVZNc9pADN0zv8I/gDCh7aHXNkPbzLQ9JGnuxhhwY2yP10D593160nqNIckwttfySnp6+lgeXO5KXKnzuCfut6tdh5XHeo11S9kfV7kC8sR9cDNcifuG9wpaJdZjGxP3xe3dBpenzmc3peYtfp/4Xa4nt4UN8aP3Du+5ed3Dr7wnbgerfw1HO/JTY+85uhSr1cBWRx8tZZ6IM8p195GWEqIR20fc5YvEX1G75j11L9RKYedAHyLbDDDMgGKBiBLY16hrIBcNsSZWl5ArrzPIf0CyAbbSnh1xqC1B0/XcjGPWGEpYW/HdY9XgV5OxmLNfeFa4puRwD40Oug1t3RiSjvpqP+P3mnEXFr1yKHi+g+N7+yK6Lfyk5HLKKBPGV9DLjenH2I7YF9aCpobmC+NdIrfqOzGLBfU6d6LlilkRBBkZ3fUZLulFGThSIyPeYd0uWctSRQF/0L5jpB73kjZaoK9or4V0OtgZEdwxmzniEOunwZ6F+0dmC+Lv3sj7xNhcsF4e0Cc/e+m1LtMaSFl1wkwKe2VfB5q9BtLWsEneBUULjJ711J1VZ0AcqiPBW8FKiFgL42ZmuX+yOohWDsZTqJeMdgOLCe8r7nkPzxzrW/ItqzlrorX4b4kgeI+IBdMYgXr2F76DzvyKvUtcr3ER8hBrPGGXSw42huiZe/Y2ER+xZ097dT/5Pr4SzzgW9SXVtGM15DbRavMap07FaAv2XDaqaJ0i9SAroec1s2HOa5+njCliUgyXfCgW7betdf4Y/+VUFiwNJ5nOBs/5WRLpimjubTKk7KslcVWcDILZs8JPNg0b9kFmvS9TITISZtallzhDGuLMOcl830k1TwmtG+VN5ntnMeoU0K/vx6v6R9p86ftIrseLftW8rTkfEz7L0RTLGe32zQ5MyUxi2Ssp3RhewZ4ztsC1cpPzPJsauiV5WPU13XJ/wWdmTAUvDfvmgK8r41Y5jEjPozryNMusYhpm8GTyfNC/Ve992MXX+l37+XxahExsjdnI1pp875jDmJOvxCBe5OTRE3I6qKGtnVnhpJS8HHhaBk+TwX+WsYfrNVjYjPJ9NsI8UFk76ALlvxsgul4rYnVtdTqhzhq/nLmqqK+9F2XhP5C3+L3lWRD9Bw==" +
				"</string></TestResult></TestResponse>" +
				"</soap:Body>" +
				"</soap:Envelope>";
			
			Assert.AreEqual( ExpectedMessage, ServerMessage.ToString( ), "Unexpected message received." );
		}
		
		private void OnBytesTransferred( object sender, TcpCommunicationEventArgs e )
		{
			if( "192.168.1.3:80" == e.SourceAddress.ToString( ) )
			{
				// Server message.
				ServerMessage.Append( UnicodeEncoding.UTF8.GetString( e.GetBytes( ) ) );
			}
			else
			{
				// Client message.
				ClientMessage.Append( UnicodeEncoding.UTF8.GetString( e.GetBytes( ) ) );
			}
		}
		
		/// <summary>
		/// Gets the xml to be read in by the <see cref="PacketLogFile"/>
		/// class.
		/// </summary>
		private string GetPacketXml( )
		{
			return "<Packets>\r\n" +
				"  <Packet Time=\"2005-02-09 12:35:32.58\" ServerFilter=\"192.168.1.3\" PortFilter=\"80\" PacketType=\"\">\r\n" +
				"    <Bytes>00 11 F5 0B 1F 69 00 11 F5 0B 1F 6A 08 00 45 00 00 30 01 EF 40 00 80 06 75 81 C0 A8 01 04 C0 A8 01 03 04 17 00 50 F8 EA 8E 25 00 00 00 00 70 02 FF FF 74 50 00 00 02 04 05 B4 01 01 04 02 </Bytes>\r\n" +
				"  </Packet>\r\n" +
				"  <Packet Time=\"2005-02-09 12:35:32.63\" ServerFilter=\"192.168.1.3\" PortFilter=\"80\" PacketType=\"\">\r\n" +
				"    <Bytes>00 11 F5 0B 1F 6A 00 11 F5 0B 1F 69 08 00 45 00 00 30 02 8F 40 00 7F 06 75 E1 C0 A8 01 03 C0 A8 01 04 00 50 04 17 CD A5 EE 24 FF FF FF F1 70 12 FF FF B8 9C 00 00 02 04 05 8C 01 01 04 02 </Bytes>\r\n" +
				"  </Packet>\r\n" +
				"  <Packet Time=\"2005-02-09 12:35:32.68\" ServerFilter=\"192.168.1.3\" PortFilter=\"80\" PacketType=\"\">\r\n" +
				"    <Bytes>00 11 F5 0B 1F 69 00 11 F5 0B 1F 6A 08 00 45 00 00 28 01 F0 40 00 80 06 75 88 C0 A8 01 04 C0 A8 01 03 04 17 00 50 FF FF FF F1 CD A5 EE 25 50 10 FF FF E5 38 00 00 </Bytes>\r\n" +
				"  </Packet>\r\n" +
				
				// Missed first packet.
		
				"  <Packet Time=\"2005-02-09 12:35:32.78\" ServerFilter=\"192.168.1.3\" PortFilter=\"80\" PacketType=\"\">\r\n" +
				"    <Bytes>00 11 F5 0B 1F 69 00 11 F5 0B 1F 6A 08 00 45 00 02 60 01 F2 40 00 80 06 73 4E C0 A8 01 04 C0 A8 01 03 04 17 00 50 00 00 05 7D CD A5 EE 25 50 18 FF FF 67 0E 00 00 70 72 65 2D 69 6E 73 74 61 6C 6C 65 64 2E 20 49 74 20 6D 61 79 20 62 65 20 6E 65 63 65 73 73 61 72 79 20 72 65 70 6C 61 63 65 20 73 6F 6D 65 20 6F 66 20 74 68 65 20 69 6E 73 74 61 6C 6C 65 64 20 0D 0A 63 6F 6D 70 6F 6E 65 6E 74 73 20 69 6E 20 6F 72 64 65 72 20 74 6F 20 67 65 74 20 61 20 6E 65 77 65 72 20 76 65 72 73 69 6F 6E 20 6F 66 20 4E 55 6E 69 74 20 74 6F 20 77 6F 72 6B 2E 20 20 0D 0A 20 0D 0A 53 65 70 61 72 61 74 65 20 63 6F 6E 66 69 67 20 66 69 6C 65 73 20 66 6F 72 20 65 61 63 68 20 2E 4E 45 54 20 76 65 72 73 69 6F 6E 20 61 72 65 20 6E 6F 20 6C 6F 6E 67 65 72 20 6E 65 65 64 65 64 2E 20 49 6E 73 74 65 61 64 2C 20 20 0D 0A 62 69 6E 64 69 6E 67 20 72 65 64 69 72 65 63 74 73 20 61 72 65 20 70 72 6F 76 69 64 65 64 20 69 6E 20 65 61 63 68 20 63 6F 6E 66 69 67 20 77 68 69 63 68 20 61 70 70 6C 79 20 77 68 65 6E 20 72 75 6E " +
				"6E 69 6E 67 20 75 6E 64 65 72 20 20 0D 0A 76 65 72 73 69 6F 6E 20 31 2E 30 20 6F 72 20 32 2E 30 20 6F 66 20 68 74 65 20 2E 4E 45 54 20 66 72 61 6D 65 77 6F 72 6B 2E 20 42 79 20 64 65 66 61 75 6C 74 2C 20 74 68 65 20 68 69 67 68 65 73 74 20 6C 65 76 65 6C 20 6F 66 20 0D 0A 74 68 65 20 66 72 61 6D 65 77 6F 72 6B 20 69 6E 73 74 61 6C 6C 65 64 20 69 73 20 75 73 65 64 2E 20 54 68 65 20 75 73 65 72 20 6D 61 79 20 65 64 69 74 20 74 68 65 20 63 6F 6E 66 69 67 20 66 69 6C 65 20 69 66 20 61 20 0D 0A 64 69 66 66 65 72 65 6E 74 20 70 72 65 66 65 72 65 6E 63 65 20 69 73 20 64 65 73 69 72 65 64 2E 3C 2F 78 6D 6C 3E 0D 0A 20 20 20 20 20 20 20 20 3C 74 65 78 74 3E 54 65 73 74 20 74 65 78 74 20 68 65 72 65 2E 2E 2E 3C 2F 74 65 78 74 3E 0D 0A 20 20 20 20 3C 2F 54 65 73 74 3E 0D 0A 20 20 3C 2F 73 6F 61 70 3A 42 6F 64 79 3E 0D 0A 3C 2F 73 6F 61 70 3A 45 6E 76 65 6C 6F 70 65 3E </Bytes>\r\n" +
				"  </Packet>\r\n" +
				
				
				// First packet retransmitted.
				
				"  <Packet Time=\"2005-02-09 12:36:32.73\" ServerFilter=\"192.168.1.3\" PortFilter=\"80\" PacketType=\"\">\r\n" +
				"    <Bytes>00 11 F5 0B 1F 69 00 11 F5 0B 1F 6A 08 00 45 00 05 B4 01 F1 40 00 80 06 6F FB C0 A8 01 04 C0 A8 01 03 04 17 00 50 FF FF FF F1 CD A5 EE 25 50 10 FF FF 47 B4 00 00 50 4F 53 54 20 2F 4D 61 74 68 57 65 62 53 65 72 76 69 63 65 2F 4D 61 74 68 73 2E 61 73 6D 78 20 48 54 54 50 2F 31 2E 31 0D 0A 55 73 65 72 2D 41 67 65 6E 74 3A 20 4D 6F 7A 69 6C 6C 61 2F 34 2E 30 20 28 63 6F 6D 70 61 74 69 62 6C 65 3B 20 4D 53 49 45 20 36 2E 30 3B 20 4D 53 20 57 65 62 20 53 65 72 76 69 63 65 73 20 43 6C 69 65 6E 74 20 50 72 6F 74 6F 63 6F 6C 20 31 2E 31 2E 34 33 32 32 2E 35 37 33 29 0D 0A 43 6F 6E 74 65 6E 74 2D 54 79 70 65 3A 20 74 65 78 74 2F 78 6D 6C 3B 20 63 68 61 72 73 65 74 3D 75 74 66 2D 38 0D 0A 53 4F 41 50 41 63 74 69 6F 6E 3A 20 22 68 74 74 70 3A 2F 2F 74 65 6D 70 75 72 69 2E 6F 72 67 2F 54 65 73 74 22 0D 0A 43 6F 6E 74 65 6E 74 2D 4C 65 6E 67 74 68 3A 20 31 36 38 32 0D 0A 45 78 70 65 63 74 3A 20 31 30 30 2D 63 6F 6E 74 69 6E 75 65 0D 0A 43 6F 6E 6E 65 63 74 69 6F 6E 3A 20 4B 65 65 70 2D 41 6C 69 " +
				"76 65 0D 0A 48 6F 73 74 3A 20 6C 6F 63 61 6C 68 6F 73 74 3A 37 30 30 31 0D 0A 0D 0A 3C 3F 78 6D 6C 20 76 65 72 73 69 6F 6E 3D 22 31 2E 30 22 20 65 6E 63 6F 64 69 6E 67 3D 22 75 74 66 2D 38 22 3F 3E 0D 0A 3C 73 6F 61 70 3A 45 6E 76 65 6C 6F 70 65 20 78 6D 6C 6E 73 3A 78 73 69 3D 22 68 74 74 70 3A 2F 2F 77 77 77 2E 77 33 2E 6F 72 67 2F 32 30 30 31 2F 58 4D 4C 53 63 68 65 6D 61 2D 69 6E 73 74 61 6E 63 65 22 20 78 6D 6C 6E 73 3A 78 73 64 3D 22 68 74 74 70 3A 2F 2F 77 77 77 2E 77 33 2E 6F 72 67 2F 32 30 30 31 2F 58 4D 4C 53 63 68 65 6D 61 22 20 78 6D 6C 6E 73 3A 73 6F 61 70 3D 22 68 74 74 70 3A 2F 2F 73 63 68 65 6D 61 73 2E 78 6D 6C 73 6F 61 70 2E 6F 72 67 2F 73 6F 61 70 2F 65 6E 76 65 6C 6F 70 65 2F 22 3E 0D 0A 20 20 3C 73 6F 61 70 3A 42 6F 64 79 3E 0D 0A 20 20 20 20 3C 54 65 73 74 20 78 6D 6C 6E 73 3D 22 68 74 74 70 3A 2F 2F 74 65 6D 70 75 72 69 2E 6F 72 67 2F 22 3E 0D 0A 20 20 20 20 20 20 3C 78 6D 6C 3E 52 65 6C 65 61 73 65 20 4E 6F 74 65 73 20 66 6F 72 20 4E 55 6E 69 74 20 32 2E 32 20 46 69 6E " +
				"61 6C 20 52 65 6C 65 61 73 65 20 0D 0A 41 75 67 75 73 74 20 38 2C 20 32 30 30 34 20 0D 0A 20 0D 0A 54 68 69 73 20 69 73 20 74 68 65 20 66 6F 75 72 74 68 20 6D 61 6A 6F 72 20 72 65 6C 65 61 73 65 20 6F 66 20 4E 55 6E 69 74 20 61 6E 64 20 74 68 65 20 74 68 69 72 64 20 73 69 6E 63 65 20 69 74 20 77 61 73 20 20 0D 0A 72 65 77 72 69 74 74 65 6E 20 74 6F 20 74 61 6B 65 20 61 64 76 61 6E 74 61 67 65 20 6F 66 20 2E 4E 45 54 20 63 75 73 74 6F 6D 20 61 74 74 72 69 62 75 74 65 73 2E 20 48 69 67 68 6C 69 67 68 74 73 20 6F 66 20 20 0D 0A 74 68 69 73 20 72 65 6C 65 61 73 65 20 69 6E 63 6C 75 64 65 20 73 75 70 70 6F 72 74 20 66 6F 72 20 4D 6F 6E 6F 2C 20 6D 75 6C 74 69 70 6C 65 2D 74 65 73 74 20 73 65 6C 65 63 74 69 6F 6E 20 69 6E 20 74 68 65 20 20 0D 0A 47 55 49 20 69 6E 74 65 72 66 61 63 65 2C 20 61 20 62 75 69 6C 74 2D 69 6E 20 6C 69 67 68 74 77 65 69 67 68 74 20 6D 6F 63 6B 20 6F 62 6A 65 63 74 20 66 61 63 69 6C 69 74 79 2C 20 6E 65 77 20 0D 0A 63 6F 6D 6D 61 6E 64 20 6C 69 6E 65 20 73 77 69 74 63 68 65 " +
				"73 20 66 6F 72 20 62 6F 74 68 20 47 55 49 20 61 6E 64 20 43 6F 6E 73 6F 6C 65 20 72 75 6E 6E 65 72 73 2C 20 61 6E 64 20 6E 65 77 20 0D 0A 43 61 74 65 67 6F 72 79 20 61 6E 64 20 45 78 70 6C 69 63 69 74 20 61 74 74 72 69 62 75 74 65 73 2E 20 0D 0A 20 0D 0A 47 45 4E 45 52 41 4C 20 0D 0A 20 0D 0A 4E 55 6E 69 74 20 32 2E 32 20 69 73 20 61 76 61 69 6C 61 62 6C 65 20 69 6E 20 73 65 70 61 72 61 74 65 20 4D 69 63 72 6F 73 6F 66 74 20 2E 4E 45 54 20 61 6E 64 20 4D 6F 6E 6F 20 64 69 73 74 72 69 62 75 74 69 6F 6E 73 2E 20 20 0D 0A 54 68 65 20 2E 4E 45 54 20 76 65 72 73 69 6F 6E 20 63 61 6E 20 72 75 6E 20 75 6E 64 65 72 20 4D 69 63 72 6F 73 6F 66 74 20 2E 4E 45 54 20 31 2E 30 2C 20 31 2E 31 20 6F 72 20 32 2E 30 2E 20 54 68 65 20 4D 6F 6E 6F 20 20 0D 0A 76 65 72 73 69 6F 6E 20 72 75 6E 73 20 75 6E 64 65 72 20 4D 6F 6E 6F 20 31 2E 30 2E 20 54 68 65 20 4D 69 63 72 6F 73 6F 66 74 20 64 69 73 74 72 69 62 75 74 69 6F 6E 20 69 73 20 62 75 69 6C 74 20 75 73 69 6E 67 20 20 0D 0A 56 69 73 75 61 6C 20 53 74 75 64 69 " +
				"6F 20 32 30 30 33 2E 20 54 68 65 20 4D 6F 6E 6F 20 76 65 72 73 69 6F 6E 20 69 73 20 6C 69 6D 69 74 65 64 20 74 6F 20 75 73 65 20 6F 66 20 6E 75 6E 69 74 2D 63 6F 6E 73 6F 6C 65 20 20 0D 0A 74 6F 20 72 75 6E 20 74 65 73 74 73 2E 20 4E 6F 74 65 20 74 68 61 74 20 4D 6F 6E 6F 20 69 73 20 64 69 73 74 72 69 62 75 74 65 64 20 77 69 74 68 20 61 20 76 65 72 73 69 6F 6E 20 6F 66 20 4E 55 6E 69 74 20 20 0D 0A </Bytes>\r\n" +
				"  </Packet>\r\n" +
				
				// Server can now acknowledge first and second packet.
				
				"  <Packet Time=\"2005-02-09 12:36:32.83\" ServerFilter=\"192.168.1.3\" PortFilter=\"80\" PacketType=\"\">\r\n" +
				"    <Bytes>00 11 F5 0B 1F 6A 00 11 F5 0B 1F 69 08 00 45 00 00 28 02 90 40 00 7F 06 75 E8 C0 A8 01 03 C0 A8 01 04 00 50 04 17 CD A5 EE 25 00 00 07 B5 50 10 FF FF DD 74 00 00 </Bytes>\r\n" +
				"  </Packet>\r\n" +
				"  <Packet Time=\"2005-02-09 12:36:32.88\" ServerFilter=\"192.168.1.3\" PortFilter=\"80\" PacketType=\"\">\r\n" +
				"    <Bytes>00 11 F5 0B 1F 6A 00 11 F5 0B 1F 69 08 00 45 00 00 98 02 91 40 00 7F 06 75 77 C0 A8 01 03 C0 A8 01 04 00 50 04 17 CD A5 EE 25 00 00 07 B5 50 18 FF FF EF C6 00 00 48 54 54 50 2F 31 2E 31 20 31 30 30 20 43 6F 6E 74 69 6E 75 65 0D 0A 53 65 72 76 65 72 3A 20 4D 69 63 72 6F 73 6F 66 74 2D 49 49 53 2F 35 2E 30 0D 0A 44 61 74 65 3A 20 57 65 64 2C 20 30 39 20 46 65 62 20 32 30 30 35 20 31 32 3A 33 35 3A 30 34 20 47 4D 54 0D 0A 58 2D 50 6F 77 65 72 65 64 2D 42 79 3A 20 41 53 50 2E 4E 45 54 0D 0A 0D 0A </Bytes>\r\n" +
				"  </Packet>\r\n" +
				"  <Packet Time=\"2005-02-09 12:36:32.93\" ServerFilter=\"192.168.1.3\" PortFilter=\"80\" PacketType=\"\">\r\n" +
				"    <Bytes>00 11 F5 0B 1F 6A 00 11 F5 0B 1F 69 08 00 45 00 05 B4 02 92 40 00 7F 06 70 5A C0 A8 01 03 C0 A8 01 04 00 50 04 17 CD A5 EE 95 00 00 07 B5 50 10 FF FF 3E E1 00 00 48 54 54 50 2F 31 2E 31 20 32 30 30 20 4F 4B 0D 0A 53 65 72 76 65 72 3A 20 4D 69 63 72 6F 73 6F 66 74 2D 49 49 53 2F 35 2E 30 0D 0A 44 61 74 65 3A 20 57 65 64 2C 20 30 39 20 46 65 62 20 32 30 30 35 20 31 32 3A 33 35 3A 30 34 20 47 4D 54 0D 0A 58 2D 50 6F 77 65 72 65 64 2D 42 79 3A 20 41 53 50 2E 4E 45 54 0D 0A 58 2D 41 73 70 4E 65 74 2D 56 65 72 73 69 6F 6E 3A 20 31 2E 31 2E 34 33 32 32 0D 0A 43 61 63 68 65 2D 43 6F 6E 74 72 6F 6C 3A 20 70 72 69 76 61 74 65 2C 20 6D 61 78 2D 61 67 65 3D 30 0D 0A 43 6F 6E 74 65 6E 74 2D 54 79 70 65 3A 20 74 65 78 74 2F 78 6D 6C 3B 20 63 68 61 72 73 65 74 3D 75 74 66 2D 38 0D 0A 43 6F 6E 74 65 6E 74 2D 4C 65 6E 67 74 68 3A 20 31 35 39 35 0D 0A 0D 0A 3C 3F 78 6D 6C 20 76 65 72 73 69 6F 6E 3D 22 31 2E 30 22 20 65 6E 63 6F 64 69 6E 67 3D 22 75 74 66 2D 38 22 3F 3E 3C 73 6F 61 70 3A 45 6E 76 65 " +
				"6C 6F 70 65 20 78 6D 6C 6E 73 3A 73 6F 61 70 3D 22 68 74 74 70 3A 2F 2F 73 63 68 65 6D 61 73 2E 78 6D 6C 73 6F 61 70 2E 6F 72 67 2F 73 6F 61 70 2F 65 6E 76 65 6C 6F 70 65 2F 22 20 78 6D 6C 6E 73 3A 78 73 69 3D 22 68 74 74 70 3A 2F 2F 77 77 77 2E 77 33 2E 6F 72 67 2F 32 30 30 31 2F 58 4D 4C 53 63 68 65 6D 61 2D 69 6E 73 74 61 6E 63 65 22 20 78 6D 6C 6E 73 3A 78 73 64 3D 22 68 74 74 70 3A 2F 2F 77 77 77 2E 77 33 2E 6F 72 67 2F 32 30 30 31 2F 58 4D 4C 53 63 68 65 6D 61 22 3E 3C 73 6F 61 70 3A 42 6F 64 79 3E 3C 54 65 73 74 52 65 73 70 6F 6E 73 65 20 78 6D 6C 6E 73 3D 22 68 74 74 70 3A 2F 2F 74 65 6D 70 75 72 69 2E 6F 72 67 2F 22 3E 3C 54 65 73 74 52 65 73 75 6C 74 3E 3C 73 74 72 69 6E 67 3E 26 6C 74 3B 74 69 63 6B 65 74 26 67 74 3B 26 6C 74 3B 75 73 65 72 26 67 74 3B 6D 61 74 74 26 6C 74 3B 2F 75 73 65 72 26 67 74 3B 26 6C 74 3B 70 61 73 73 77 6F 72 64 26 67 74 3B 73 65 63 72 65 74 26 6C 74 3B 2F 70 61 73 73 77 6F 72 64 26 67 74 3B 26 6C 74 3B 2F 74 69 63 6B 65 74 26 67 74 3B 3C 2F 73 74 72 69 6E " +
				"67 3E 3C 73 74 72 69 6E 67 3E 68 56 5A 4E 63 39 70 41 44 4E 30 7A 76 38 49 2F 67 44 43 68 37 61 48 58 4E 6B 50 62 7A 4C 51 39 4A 47 6E 75 78 68 68 77 59 32 79 50 31 30 44 35 39 33 31 36 30 6E 71 4E 49 63 6B 77 74 74 66 79 53 6E 70 36 2B 6C 67 65 58 4F 35 4B 58 4B 6E 7A 75 43 66 75 74 36 74 64 68 35 58 48 65 6F 31 31 53 39 6B 66 56 37 6B 43 38 73 52 39 63 44 4E 63 69 66 75 47 39 77 70 61 4A 64 5A 6A 47 78 50 33 78 65 33 64 42 70 65 6E 7A 6D 63 33 70 65 59 74 66 70 2F 34 58 61 34 6E 74 34 55 4E 38 61 50 33 44 75 2B 35 65 64 33 44 72 37 77 6E 62 67 65 72 66 77 31 48 4F 2F 4A 54 59 2B 38 35 75 68 53 72 31 63 42 57 52 78 38 74 5A 5A 36 49 4D 38 70 31 39 35 47 57 45 71 49 52 32 30 66 63 35 59 76 45 58 31 47 37 35 6A 31 31 4C 39 52 4B 59 65 64 41 48 79 4C 62 44 44 44 4D 67 47 4B 42 69 42 4C 59 31 36 68 72 49 42 63 4E 73 53 5A 57 6C 35 41 72 72 7A 50 49 66 30 43 79 41 62 62 53 6E 68 31 78 71 43 31 42 30 2F 58 63 6A 47 50 57 47 45 70 59 57 2F 48 64 59 39 58 67 56 35 4F 78 6D 4C 4E 66 65 46 61 34 70 75 " +
				"52 77 44 34 30 4F 75 67 31 74 33 52 69 53 6A 76 70 71 50 2B 50 33 6D 6E 45 58 46 72 31 79 4B 48 69 2B 67 2B 4E 37 2B 79 4B 36 4C 66 79 6B 35 48 4C 4B 4B 42 50 47 56 39 44 4C 6A 65 6E 48 32 49 37 59 46 39 61 43 70 6F 62 6D 43 2B 4E 64 49 72 66 71 4F 7A 47 4C 42 66 55 36 64 36 4C 6C 69 6C 6B 52 42 42 6B 5A 33 66 55 5A 4C 75 6C 46 47 54 68 53 49 79 50 65 59 64 30 75 57 63 74 53 52 51 46 2F 30 4C 35 6A 70 42 37 33 6B 6A 5A 61 6F 4B 39 6F 72 34 56 30 4F 74 67 5A 45 64 77 78 6D 7A 6E 69 45 4F 75 6E 77 5A 36 46 2B 30 64 6D 43 2B 4C 76 33 73 6A 37 78 4E 68 63 73 46 34 65 30 43 63 2F 65 2B 6D 31 4C 74 4D 61 53 46 6C 31 77 6B 77 4B 65 32 56 66 42 35 71 39 42 74 4C 57 73 45 6E 65 42 55 55 4C 6A 4A 37 31 31 4A 31 56 5A 30 41 63 71 69 50 42 57 38 46 4B 69 46 67 4C 34 32 5A 6D 75 58 2B 79 4F 6F 68 57 44 73 5A 54 71 4A 65 4D 64 67 4F 4C 43 65 38 72 37 6E 6B 50 7A 78 7A 72 57 2F 49 74 71 7A 6C 72 6F 72 58 34 62 34 6B 67 65 49 2B 49 42 64 4D 59 67 58 72 32 46 37 36 44 7A 76 79 4B 76 55 74 63 72 33 45 52 38 68 " +
				"42 72 50 47 47 58 53 77 34 32 68 75 69 5A 65 2F 59 32 45 52 2B 78 5A 30 39 37 64 54 2F 35 50 72 34 53 7A 7A 67 57 39 53 58 56 74 47 4D 31 35 44 62 52 61 76 4D 61 70 30 37 46 61 41 76 32 58 44 61 71 61 4A 30 69 39 53 41 72 6F 65 63 31 73 32 48 4F 61 35 2B 6E 6A 43 6C 69 55 67 79 58 66 43 67 57 37 62 65 74 64 66 34 59 2F 2B 56 55 46 69 77 4E 4A 35 6E 4F 42 73 2F 35 57 52 4C 70 69 6D 6A 75 62 54 4B 6B </Bytes>\r\n" +
				"  </Packet>\r\n" +
				"  <Packet Time=\"2005-02-09 12:36:32.98\" ServerFilter=\"192.168.1.3\" PortFilter=\"80\" PacketType=\"\">\r\n" +
				"    <Bytes>00 11 F5 0B 1F 69 00 11 F5 0B 1F 6A 08 00 45 00 00 28 01 F3 40 00 80 06 75 85 C0 A8 01 04 C0 A8 01 03 04 17 00 50 00 00 07 B5 CD A5 F4 21 50 10 FF FF D7 78 00 00 </Bytes>\r\n" +
				"  </Packet>\r\n" +
				"  <Packet Time=\"2005-02-09 12:36:33.03\" ServerFilter=\"192.168.1.3\" PortFilter=\"80\" PacketType=\"\">\r\n" +
				"    <Bytes>00 11 F5 0B 1F 6A 00 11 F5 0B 1F 69 08 00 45 00 01 BD 02 93 40 00 7F 06 74 50 C0 A8 01 03 C0 A8 01 04 00 50 04 17 CD A5 F4 21 00 00 07 B5 50 18 FF FF 5D 8C 00 00 37 4B 73 6C 63 56 57 63 44 49 4C 5A 73 38 4A 50 4E 67 30 62 39 6B 46 6D 76 53 39 54 49 54 49 53 5A 74 61 6C 6C 7A 68 44 47 75 4C 4D 4F 63 6C 38 33 30 6B 31 54 77 6D 74 47 2B 56 4E 35 6E 74 6E 4D 65 6F 55 30 4B 2F 76 78 36 76 36 52 39 70 38 36 66 74 49 72 73 65 4C 66 74 57 38 72 54 6B 66 45 7A 37 4C 30 52 54 4C 47 65 33 32 7A 51 35 4D 79 55 78 69 32 53 73 70 33 52 68 65 77 5A 34 7A 74 73 43 31 63 70 50 7A 50 4A 73 61 75 69 56 35 57 50 55 31 33 58 4A 2F 77 57 64 6D 54 41 55 76 44 66 76 6D 67 4B 38 72 34 31 59 35 6A 45 6A 50 6F 7A 72 79 4E 4D 75 73 59 68 70 6D 38 47 54 79 66 4E 43 2F 56 65 39 39 32 4D 58 58 2B 6C 33 37 2B 58 78 61 68 45 78 73 6A 64 6E 49 31 70 70 38 37 35 6A 44 6D 4A 4F 76 78 43 42 65 35 4F 54 52 45 33 49 36 71 4B 47 74 6E 56 6E 68 70 4A 53 38 48 48 68 61 42 6B 2B 54 77 58 2B 57 73 59 66 72 4E 56 6A 59 6A 50 " +
				"4A 39 4E 73 49 38 55 46 6B 37 36 41 4C 6C 76 78 73 67 75 6C 34 72 59 6E 56 74 64 54 71 68 7A 68 71 2F 6E 4C 6D 71 71 4B 2B 39 46 32 58 68 50 35 43 33 2B 4C 33 6C 57 52 44 39 42 77 3D 3D 3C 2F 73 74 72 69 6E 67 3E 3C 2F 54 65 73 74 52 65 73 75 6C 74 3E 3C 2F 54 65 73 74 52 65 73 70 6F 6E 73 65 3E 3C 2F 73 6F 61 70 3A 42 6F 64 79 3E 3C 2F 73 6F 61 70 3A 45 6E 76 65 6C 6F 70 65 3E </Bytes>\r\n" +
				"  </Packet>\r\n" +
				"  <Packet Time=\"2005-02-09 12:36:33.58\" ServerFilter=\"192.168.1.3\" PortFilter=\"80\" PacketType=\"\">\r\n" +
				"    <Bytes>00 11 F5 0B 1F 69 00 11 F5 0B 1F 6A 08 00 45 00 00 28 01 F4 40 00 80 06 75 84 C0 A8 01 04 C0 A8 01 03 04 17 00 50 00 00 07 B5 CD A5 F5 B6 50 10 FE 6A D7 78 00 00 </Bytes>\r\n" +
				"  </Packet>\r\n" +
				"</Packets>";
		}
	}
}
